unless (open FH, "-|") {

     exec "ffmpeg -y -i /var/shandiangou.mov 2>&1|tr '\r' '\n'";        # 用exec执行另一个程序
     exit;
}
while (<FH>) {

        $s_tmp = $_;
        $index_Video = index($s_tmp, "Video");
        if($index_Video >= 0) {

	    $s_tmp = substr($s_tmp, $index_Video+6);
            $s_tmp =~ s/^\s+//;
     #       $s_tmp =~ s/\s+$//;
	    print $s_tmp, "\r";
	    @a_video = split(/,/, $s_tmp);
	    $s_vcode = get_val($a_video[0]);
	    print "a_video[1]:", $a_video[1], "\n";
	    $s_resolution = get_val($a_video[2]);
	    $s_bitrate =  get_val($a_video[3]);
	    $s_fps = get_val($a_video[4]);
	    print "a_video[5]:", $a_video[5], "\n";
	    print "a_video[6]:", $a_video[6], "\n";
	    print "a_video[7]:", $a_video[7], "\n";
        }

}

